FROM eclipse-temurin:11-jdk

ARG PACKAGE_NAME
ARG PACKAGE_EXTENSION="tar"

ENV MIGRATION_TOOLS_CLI_HOME="/opt/$PACKAGE_NAME"

ADD $PACKAGE_NAME.$PACKAGE_EXTENSION /opt
WORKDIR $MIGRATION_TOOLS_CLI_HOME

ENV PATH="${PATH}:$MIGRATION_TOOLS_CLI_HOME/bin"

ENTRYPOINT ["bin/migration-tools"]